<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@page import="com.zpyr.mvc.vo.Carc_evaluation"%>
<%@page import="java.util.List"%>
<%@page import="com.zpyr.mvc.vo.Carc_info"%>
<%@page import="com.zpyr.common.StringUtil"%>
<!DOCTYPE html>
<html>
<head>
<%


	Carc_info carc_info =(Carc_info) request.getAttribute("carc_info");
	List<Carc_evaluation> eval_list = (List<Carc_evaluation>) request.getAttribute("eval_list");

	String carc_name = "";
	String info_seq = "";
	
	if( carc_info != null ) {
		carc_name = carc_info.getName();
		info_seq = carc_info.getInfo_seq();
	}
	
	
%>
<title><%=carc_name %></title>
<link rel="stylesheet" href="/css/common.css" />
<style>

</style>
</head>
<body>

<div class="header">
<span style=""><%=carc_name %> - 평가보기</span>
<input type="button" class="button1" value="평가입력" style="float:right;" onclick="popupInsertEval(this)" />
</div>

<div class="content1" id="page_evaluation_div" style="position:absolute; left:0px; top:40px; z-index:50; width:90%; display:none;">
<h3>평가 하기<span style="float:right; cursor:pointer;" onclick="goCarcenterEvaluationPage('<%=info_seq%>')">X</span></h3>
<ul style="vertical-align: top;">
<li>평점 : <input id="page_evaluation_grade" type="range" min="0" max="10" onchange="$('#evaluation_page_input_display').text(this.value)" /> <span id="evaluation_page_input_display"></span><br /><br />  </li>
<li>작성자명 : <input type="text" id="page_evaluation_writer_name" /><br /><br /> </li>
<li><textarea id="page_evaluation_content" style="width:80%; margin-left:10%;" rows="4"></textarea>  </li>
<li> <div style="width:78%; margin-left:10%;" class="button1" onclick="doInsertEvaluation( '<%=info_seq %>' , $('#page_evaluation_writer_name').val() , $('#page_evaluation_grade').val() , $('#page_evaluation_content').val() );">입력하기</div> </li>
</ul>
<br />
</div>

<div class="content2" style="padding-bottom: 20px;">
<h3>평가 리스트</h3>
<div id="page_evaluation_scrollList1" style="height:350px;">
	<ul>
	<%
	if(eval_list != null) {
		for(Carc_evaluation eval : eval_list) {
	%>			
	<li>
	<br />
	<span style="font-weight: bold;"><%=eval.getRecent_dateYmd("-") %> <%=eval.getRecent_dateHms(":") %></span>
	<br /><br />
	<%=StringUtil.textTOhtml( eval.getContent() ) %>	
	<br /><br /><hr />
	<strong><label style="color: #ee3355;"><%=eval.getGrade() %></label> / 10</strong>
	<strong style="margin-right: 10px; float:right;">
	<img src="/images/icons/user3.png" width="10px;" />
	<%=eval.getWriter_name() %></strong>
	<hr size="5" />
	</li>
	<% 			
		}
	}
	%>
	</ul>
</div>
<script>
new iScroll('page_evaluation_scrollList1');
$('#evaluation_page_input_display').text( $('#page_evaluation_grade').val() );
</script>
</body>
</html>